﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace QuanLyTienDien
{
    class classBienLai:classKhachHang
    {
        //khai bao thuoc tinh
        private int cu;
        private int moi;
        private double tientra;
        //xay dung thuoc tinh
        public int CU
        {
            get { return cu; }
            set { cu = value; }
        }
        public int MOI
        {
            get { return moi; }
            set { moi = value; }
        }
        public double TIENTRA
        {
            get { return tientra; }
            set { tientra = value; }
        }
        
        
        //xd ham co tham so ke thua thuoc tinh hoten,sonha,macongto cualop classKhachHang
        public classBienLai(string t,int so,int ma,int c,int m,double tien):base(t,so,ma)
        {
            cu = c;
            moi = m;
            tientra = tien;
        }
        //phương thức tính tiền điện
        public double TinhTien()
        {
            if (moi - cu < 50)
                return (moi - cu) * 1250;
            else if (moi - cu > 50 && moi - cu < 100)
                return (moi - cu) * 1500;
            else
                return (moi - cu) * 2000;
        }
    }
}
